<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><spring:message  code="pim"/> - <spring:message  code="title.change.password"/></title>
<link href="<%= request.getContextPath() %>/css/custom.css" rel="stylesheet" type="text/css" />
<link href="<%= request.getContextPath() %>/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%= request.getContextPath() %>/css/v.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=request.getContextPath()%>/js/jquery-1.6.2.js"></script>
<%@include file="script/pim-util.jsp" %>
<style type="text/css">
.v-input{
width: 200px;
}
.v-span{
padding-left: 40px;
}
</style>
<%@include file="script/pim-util.jsp" %>
</head>
<body>
<c:if test="${bean.isSigned == true}">
<div id="all">
<div id="wrapper">
<div id="mainheader">
	<jsp:include page="include/common/headerSignedIn.jsp" />
</div> 
<div id="content-wrapper">
<div id="top-menu">
    <jsp:include page="include/common/topMenuHome.jsp" />
</div>
<div class="v-body">
<div style="margin-left: 40px;margin-right: 40px;">
<div class="v-row">
    <form:form action="" method="post" commandName="changePassword">      
     <div class="v-row v-border-bottom">
     <div class="v-row-left">
        <span class="v-title"><spring:message code="title.change.password"/></span>
     </div>
    </div>
             
      <c:if test="${changePasswordOK == true }">
      	<span class="v-global-success-message v-row">
      	    <span><spring:message  code="change.password.success" /></span>
      	</span>
     </c:if>	   
     <c:if test="${changePasswordOK == false }">
      	<span class="v-global-error-message v-row">
      	    <span><spring:message  code="change.password.error" /></span>
      	</span>
     </c:if>	 
          
     <div class="v-row"  style="padding-top: 20px; padding-bottom: 20px;">    
       <span class="v-info"><spring:message code="title.change.password.tip"/></span>                    
     </div>      
             
     <div class="v-row" >
		<div class="v-row-left" style="margin-left: 200px;"><span><spring:message code="title.required.password.current" /></span></div>
		<div class="v-row-right sixty">
			<span class="v-span"><form:password maxlength="100" path="currentPassword" cssClass="v-input"/></span>			
			<form:errors path="currentPassword" cssClass="v-error-message" />
	   </div>
      </div>
                    
      <div class="v-row">
			<div class="v-row-left" style="margin-left: 200px;"><span><spring:message code="title.required.password.new" /></span></div>
			<div class="v-row-right sixty">
				<span class="v-span"><form:password maxlength="100" path="newPassword1" cssClass="v-input"/></span>				
				<form:errors path="newPassword1" cssClass="v-error-message" />
			</div>		
      </div>                
       
      <div class="v-row">        
			<div class="v-row-left" style="margin-left: 200px;"><span><spring:message code="title.required.password.new.again" /></span></div>
			<div class="v-row-right sixty">
				<span class="v-span"><form:password maxlength="100" path="newPassword2" cssClass="v-input"/></span>				
				<form:errors path="newPassword2" cssClass="v-error-message" />
			</div>	    
	  </div>
	  	  
	  <div class="v-row">
		    <br/>
			<div class="v-row-center">
				<span>
				<input type="submit" id="changePassword" class="bt-form" value="<spring:message code="button.save" />" />
				</span>				
				<span>
				<input type="button" class="bt-form"
						onclick="cancel('<c:out value='${bean.returnToFullPageURL }'/>')"
						value="<spring:message code="button.cancel"/>" />
				</span>
			</div>
		</div>	
	<input type="hidden" name="returnToFullPageURL" value="${bean.returnToFullPageURL}"/>
   </form:form>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
	<jsp:include page="include/common/footer.jsp" />
</div>
</div>
</c:if>
</body>
</html>